package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.InvoicesControlDto;
import xyz.zhouzhaodong.crm.entity.InvoicesControl;
import xyz.zhouzhaodong.crm.service.IInvoicesControlService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 发票管理 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-07-03
 */
@RestController
@RequestMapping("/invoices-control")
public class InvoicesControlController {

    @Resource
    IInvoicesControlService invoicesControlService;

    /**
     * 新增发票管理
     * @param invoicesControl
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addInvoicesControl(InvoicesControl invoicesControl){
        return invoicesControlService.addInvoicesControl(invoicesControl);
    }

    /**
     * 删除发票管理
     * @param invoicesControl
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteInvoicesControl(InvoicesControl invoicesControl){
        return invoicesControlService.deleteInvoicesControl(invoicesControl);
    }

    /**
     * 修改发票管理
     * @param invoicesControl
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateInvoicesControl(InvoicesControl invoicesControl){
        return invoicesControlService.updateInvoicesControl(invoicesControl);
    }

    /**
     * 查询发票管理
     * @param invoicesControlDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectInvoicesControl(InvoicesControlDto invoicesControlDto){
        return invoicesControlService.selectInvoicesControl(invoicesControlDto);
    }
    
}
